home *** CD-ROM | disk | FTP | other *** search
/ SPACE 2 / SPACE - Library 2 - Volume 1.iso / utility / 1a / gem / gemcl8.doc next >
Encoding:
Text File  |  1985-05-29  |  24.8 KB  |  483 lines

  1.      Permission to reprint or excerpt is granted only if the
  2. following line appears at the top of the article:
  3.  
  4.      ANTIC PUBLISHING INC.,COPYRIGHT 1986.  REPRINTED BY PERMISSION.
  5.  
  6.                           USER INTERFACES
  7.                              HOMILY #1
  8.  
  9.      AND NOW FOR SOMETHING COMPLETELY DIFFERENT!  In response to a
  10. number of requests, this installment of ST PRO GEM will be devoted
  11. to examining a few of the principles of computer/human interface
  12. design, or "religion" as some would have it.  I'm going to start
  13. with basic ergonomic laws, and try to draw some conclusions which
  14. are fairly specific to designing for the ST.  If this article
  15. meets with general approval, further "homilies" may appear at
  16. irregular intervals as part of the ST PRO GEM series.
  17.  
  18.      For those who did NOT ask for this topic, it seems fair to
  19. explain why your diet of hard-core technical information has been
  20. interrupted by a sermon!  As a motivater, we might consider why
  21. some programs are said by reviewers to have a "hot" feel (and
  22. hence sell well!) while others are "confusing" or "boring".
  23.  
  24.      Alan Kay has said that "user interface is theatre".  I think
  25. we may be able to take it further, and suggest that a successful
  26. program works a bit of magic, persuading the user to suspend his
  27. disbelief and enter an imaginary world behind the screen, whether
  28. it is the mathematical world of a spreadsheet, or the land of Pacman
  29. pursued by ghosts.
  30.  
  31.      A reader of a novel or science fiction story also suspends
  32. disbelief to participate in the work.  Bad grammar and clumsy plotting
  33. by the author are jarring, and break down the illusion.  Similarly,
  34. a programmer who fails to pay attention to making his interface
  35. fast and consistent will annoy the user, and distract him from
  36. whatever care has been lavished on the functional core of the program.
  37.  
  38.      CREDIT WHERE IT'S DUE.  Before launching into the discussion
  39. of user interface, I should mention that the general treatment and
  40. many of the specific research results are drawn from Card, Newell,
  41. and Moran's landmark book on the topic, which is cited at the end
  42. of the article.  Any errors in interpretation and application to
  43. GEM and the ST are entirely my own, however.
  44.  
  45.      FINGERTIPS.  We'll start right at the user's fingers with the
  46. basic equation governing positioning of the mouse, Fitt's Law,
  47. which is given as
  48.  
  49.      T = I * LOG2( D / S + .5)
  50.  
  51.  where T is the amount of time to move to a target, D is the distance
  52. of the target from the current position, and S is the size of the
  53. target, stated in equivalent units.  LOG2 is the base 2 (binary)
  54. logarithm function, and I is a proportionality constant, about
  55. 100 milliseconds per bit, which corresponds to the human's "clock
  56. rate" for making incremental movements.
  57.  
  58.      We can squeeze an amazing amount of information out of this
  59. formula when attempting to speed up an interface.  Since motion time
  60. goes up with distance, we should arrange the screen with the
  61. usual working area near the center, so the mouse will have to move
  62. a smaller distance on average from a selected object to a menu or
  63. panel.  Likewise, any items which are usually used together should
  64. be placed together.
  65.  
  66.      The most common operations will have the greater impact on
  67. speed, so they should be closest to the working area and perhaps
  68. larger than other icons or menu entries.  If you want to have
  69. all other operations take about the same time, then the targets
  70. farthest from the working area should be larger, and those closer
  71. may be proportionately smaller.
  72.  
  73.      Consider also the implications for dialogs.  Small check boxes
  74. are out.  Large buttons which are easy to hit are in.  There should
  75. be ample space between selectable items to allow for positioning
  76. error.  Dangerous options should be widely separated from common
  77. selections.
  78.  
  79.      MUSCLES.  Anyone who has used the ST Desktop for any period
  80. of time has probably noticed that his fingers now know where to find
  81. the File menu.  This phenomenon is sometimes called "muscle memory",
  82. and its rate of onset is given by the Power Law of Practice:
  83.  
  84.      T(n) = T(1) * n ** (-a)
  85.  
  86. where T(n) is the time on the nth trial, T(1) is the time on the
  87. first trial, and a is approximately 0.4.  (I have appropriated
  88. ** from Fortran as an exponentiation operator, since C lacks one.)
  89.  
  90.      This first thing to note about the Power Law is that it only
  91. works if a target stays in the same place!  This should be a potent
  92. argument against rearranging icons, menus, or dialogs without some
  93. explicit request by the user.  The time to hit a target which moves
  94. around arbitrarily will always be T(1)!
  95.  
  96.      In many cases, the Power Law will also work for sequences of
  97. operations to even greater effect.  If you are a touch typist, you
  98. can observe this effect by comparing how fast you can enter "the"
  99. in comparison to three random letters.  We'll come back shortly
  100. to consider what we can do to encourage this phenomenon.
  101.  
  102.      EYES.  Just as fingers are the way the user sends data to the
  103. computer, so the eyes are his channel from the machine.  The rate
  104. at which information may be passed to the user is determined by
  105. the "cycle time" of his visual processor.  Experimental results
  106. show that this time ranges between 50 and 200 milliseconds.
  107.  
  108.      Events separated by 50 milliseconds or less are always
  109. perceived as a single event.  Those separated by more than 200
  110. milliseconds are always seen as separate.  We can use these
  111. facts in optimizing user of the computer's power when driving the
  112. interface.
  113.  
  114.      Suppose your application's interface contains an icon which
  115. should be inverted when the mouse passes over it.  We now know
  116. that flipping it within one twentieth of a second is necessary
  117. and sufficient.  Therefore, if a "first cut" at the program achieves
  118. this performance, there is no need for further optimization, unless
  119. you want to interleave other operations.  If it falls short, it will
  120. be necessary to do some assembly coding to achieve a smooth feel.
  121.  
  122.      On the other hand, two actions which you want to appear distinct
  123. or convey two different pieces of information must be separated
  124. by an absolute minimum of a fifth of a second, even assuming that
  125. they occur in an identical location on which the user's attention
  126. is already focused.
  127.  
  128.      We are able to influence the visual processing rate within the
  129. 50 to 200 millisecond range by changing the intensity of the stimulus
  130. presented.  This can be done with color, by flashing a target, or
  131. by more subtle enhancements such as bold face type.  For instance,
  132. most people using GEM soon become accustomed to the "paper white"
  133. background of most windows and dialogs.  A dialog which uses a
  134. reverse color scheme, white letters on black, is visually shocking
  135. in its starkness, and will immediately draw the user's eyes.
  136.  
  137.      It should be quickly added that stimulus enhancement will only
  138. work when it unambiguously draws attention to the target.  Three or
  139. four blinking objects scattered around the screen are confusing, and
  140. worse than no enhancement at all!
  141.  
  142.      SHORT-TERM MEMORY.  Both the information gathered by the eyes
  143. and movement commands on their way to the hand pass through short-term
  144. memory (also called working memory).  The amount of information which
  145. can be held in short-term memory at any one time is limited.  You can
  146. demonstrate this limit on yourself by attempting to type a sheet of
  147. random numbers by looking back and forth from the numbers to the
  148. screen.  If you are like most people, you will be able to remember
  149. between five and nine numbers at a time.  So universal is this
  150. finding that it is sometimes called "the magic number seven, plus
  151. or minus two".
  152.  
  153.      This short-term capacity sets a limit on the number of choices
  154. which the user can be expected to grasp at once.  It suggests that
  155. the number of independent choices in a menu, for instance, should
  156. be around seven, and never exceed nine.  If this limit is violated,
  157. then the user will have to take several glances, with pauses to
  158. think, in order to make a choice.
  159.  
  160.      CHUNKING.  The effective capacity of short-term memory can be
  161. increased when several related items are mentally grouped as a "chunk".
  162. Humans automatically adopt this strategy to save themselves time.
  163. For instance, random numbers had to be used instead of text in the
  164. example above, because people do not type their native language as
  165. individual characters.  Instead, they combine the letters into words
  166. and remember these chunks instead.  Put another way, the characters
  167. are no longer considered as individual choices.
  168.  
  169.      A well designed interface should promote the use of chunking
  170. as a strategy by the user.  One easy way is to gather together
  171. related options in a single place.  This is one reason that like
  172. commands are grouped into a single menu which is hidden except for
  173. its title.  If all of the menu options were "in the open", the user
  174. would be overwhelmed with dozens of alternatives at once.  Instead, a
  175. "Show Info" command, for instance, becomes two chunks: pick File
  176. menu, then pick Show.
  177.  
  178.      Sometimes the interface can accomplish the chunking for the user.
  179. Consider the difference between a slider bar in a GEM program, and
  180. a three digit entry field in a text mode application.  Obviously,
  181. the GEM user has fewer decisions to make in order to set the associated
  182. variable.
  183.  
  184.      THINK!  While we are puttering around trying to speed up
  185. the keyboard, the mouse, and the screen, the user is actually
  186. trying to get some work done.  We need to back off now, and
  187. look at the ways of thinking, or cognitive processes, that go into
  188. accomplishing the job.
  189.  
  190.      The user's goal may be to enter and edit a letter, to retrieve
  191. information from a database, or simply draw a picture, but it
  192. probably has very little to do with programming.  In fact, the
  193. Problem Space Principle says that the task can be described as
  194. a set of states of knowledge, a set of operators and associated
  195. constraints for changing the states, and the knowledge to
  196. choose the appropriate operator, which resides in the user's head.
  197.  
  198.      Those with a background in systems theory can consider this
  199. as a somewhat abstract, but straightforward, statement in terms of
  200. state variables and operators.  A programmer might compare the
  201. knowledge states to the values of variables, the operators to
  202. arithmetic and logic operations, the constraints to the rules of
  203. syntax, and the user's knowledge to the algorithm embodied by a
  204. program.
  205.  
  206.      ARE WE NOT MEN?  A rational person will try to attain his
  207. goals (get the job done) by changing the state of his problem space
  208. from its initial state to the goal state.  The initial state,
  209. for instance, might be a blank word processor screen.  The desired
  210. final state is to have a completed business letter on the screen.
  211.  
  212.      The Rationality Principle says that the user's behavior in
  213. typing, mousing, and so on, can be explained by considering the
  214. tasks required to achieve the goal, the operators available to
  215. carry out the tasks, and the limitations on the user's knowledge,
  216. observations, and processing capacity.  This sounds like the
  217. typical user of a computer program must spend a good deal of time
  218. scratching his head and wondering what to do next.  In fact, one
  219. of Card and Moran's key results is that this is NOT what takes place.
  220.  
  221.      What happens, in fact, is that the trained user strikes a sort
  222. of "modus vivendi" with his tool and adopts a set of repetitive,
  223. trained behavior patterns as the best way to get the job done.
  224. He may go so far as to ignore some functions of the program in
  225. order to set up a reliable pattern.  What we are looking for is a
  226. way of measuring and predicting the "quality" of this trained
  227. behavior.  Since using computers is a human endeavor, we should
  228. consider not only the speed with which the task is completed, but
  229. the degree of annoyance or pleasure associated with the process.
  230.  
  231.      Card and Moran constructed a series of behavioral models which
  232. they called GOMS models, for Goals-Operators-Methods-Selection.
  233. These models suggested that in the training process the user
  234. learned to combine the basic operators in sequences (chunks!)
  235. which then became methods for reaching the goals.  Then these
  236. first level methods might be combined again into second level
  237. methods, and so forth, as the learning progressed.
  238.  
  239.      The GOMS models were tested in a lengthy series of trials
  240. at Xerox PARC using a variety of word processing software.  (Among
  241. the subjects of these experiments were the inventors of
  242. the windowing methods used in GEM!)  The results were again
  243. surprising: the level of detail in the models was really unimportant!
  244.  
  245.      It turned out to be sufficient to merely count up the number
  246. of keystrokes, mouse movements, and thought intervals required
  247. by each task.  After summing up all of the tasks, any extra time
  248. for the computer to respond, or the user to move his hands from
  249. keyboard to mouse, or eyes from screen to printed page is added in.
  250. This simplified version is called the Keystroke-Level Model.
  251.  
  252.      As an example of the Keystroke Model, consider the task of
  253. changing a mistyped letter on the screen of a GEM word processor.
  254. This might be broken down as follows: 1) find the letter on the screen;
  255. 2) move hand to mouse; 3) point to letter; 4) click mouse button;
  256. 5) move hand to keyboard; 6) strike "Delete" key; 7) strike key
  257. for new character.
  258.  
  259.      The sufficiency of the Keystroke Model is great news for our
  260. attempt to design faster interfaces.  It says we can concentrate
  261. our efforts on minimizing the number of total actions to be taken,
  262. and making sure that each action is as fast as possible.  We have
  263. already discussed some ways to speed up the mouse and keyboard
  264. actions, so let's now consider how to speed up the thought intervals,
  265. and cut the number of actions.
  266.  
  267.      One way to cut down "think time" is to make sure that the
  268. capacity of short-term memory is not exceeded during the course of
  269. a task.  For example, the fix-a-letter task described above required
  270. the user to remember 1) his place in the overall job of typing the
  271. document; 2) the task he is about to perform; 3) where the bad
  272. character appeared, and 4) what the new character was.  When this
  273. total of items creeps toward seven, the user often loses his place
  274. and commits errors.
  275.  
  276.      You can appreciate the ubiquity of this problem by considering
  277. how many times you have made mistakes nesting parentheses,
  278. or had to go back to count them, because too many things happened
  279. while typing the line to remember the nesting levels. The moral is that
  280. operations with long strings of operands should be avoided when
  281. designing an interface.
  282.  
  283.      The single most important factor in making an interface
  284. comfortable to use is increasing its predictability, and
  285. decreasing the amount of indecision present at each step during
  286. a task.  There is (inevitably) an Uncertainty Principle which
  287. relates the number of choices at each step to the associated
  288. time for thought:
  289.  
  290.      T = I * LOG2 ( N + 1)
  291.  
  292.  where LOG2 is the binary logarithm function, N is the number of
  293. equally probable choices, and I is a constant of approximately
  294. 140 msec/bit.  When the alternates are not equally probable, the
  295. function is more complex:
  296.  
  297.      T = I * SUM-FOR-i-FROM-1-TO-N (P(i) * LOG2( 1 / P(i) + 1) )
  298.  
  299.  where the P(i) are the probabilities of each of the choices (which
  300. must sum to one).  (SUM-FOR-i... is the best I can do for a sigma
  301. operator on-line!)  Those of you with some information theory
  302. background will recognize this formula as the entropy of
  303. the decision; we'll come back to that later.
  304.  
  305.      So what can we learn from this hash?  It turns out, as we might
  306. expect, that we can decrease the decision time by making some
  307. of the user's choices more probable than others.  We do that by
  308. means of feedback cues from the interface.
  309.  
  310.      The important of reliable, continuous meaningful feedback
  311. cannot be emphasized enough.  It helps the beginner learn the system,
  312. and its predictability makes the program comfortable for the expert.
  313. Programs with no feedback, or unreliable cues, produce confusion,
  314. dissonance, and frustration in the user.
  315.  
  316.      This principle is so important that I going to give several
  317. examples from common GEM practice.  The Desktop provides several
  318. instances.  When an object is selected and a menu drops down, only
  319. those choices which are legal for the object are in black.  The
  320. others are dimmed to grey, and are therefore removed from the
  321. decision.  When a pick is made from the menu, the bar entry remains
  322. black until the operation is complete, reassuring the user that
  323. the correct choice was made.  In both the Desktop and the RCS,
  324. items which are double-clicked open up with a "zoom box" from
  325. the object, again showing that the right object was picked.
  326.  
  327.      Other techniques are useful when operator icons are exposed on
  328. the screen.  When an object is picked, the legal operations might
  329. be outlined, or the bad choices might be dimmed.  If the screen
  330. flashing produced by this is objectionable, the legal icons can
  331. be made mouse sensitive, so they will "light up" when the cursor
  332. passes over - again showing the user which choices are legal.
  333.  
  334.      The desire for feedback is so strong that it should be provided
  335. even while the computer is doing an operation on its own.  The hour
  336. glass mouse form is a primitive example of this.  More sophisticated
  337. are "progress indicators" such as animated thermometer bars,
  338. clocks, or text displays of the processing steps.  The ST Desktop
  339. provides examples in the Format and Disk Copy functions.  The purpose
  340. of all of these is to reassure the user that the operation is
  341. progressing normally.  Their lack can lead to amusing spectacles
  342. such as secretaries leaning over to hear if their disk drives are
  343. working!
  344.  
  345.      Another commonly overlooked feature is error prevention and
  346. correction.  Card and Moran's results showed that in order to go
  347. faster, people will tolerate error rates of up to 30% in their
  348. work.  Any program which does not give a fast way to fix mistakes
  349. will be frustrating indeed!
  350.  
  351.      The best way to cope with an error is to "make it didn't happen",
  352. to quote a common child's phrase.  The same feedback methods
  353. discussed above are also effective in preventing the user from
  354. picking inappropriate combinations of objects and operations.
  355. Replacement of numeric type-ins with sliders or other visual
  356. controls eliminates the common "Range Error".  The use of radio
  357. buttons prevents the user from picking incompatible options.
  358. When such techniques are used consistently, the beginner also
  359. gains confidence that he may explore the program without blundering
  360. into errors.
  361.  
  362.      Once an error has occured, the best solution is to have an
  363. "inverse operation" immediately available.  For instance, the way
  364. to fix a bad character is to hit the backspace key.  If a line is
  365. inadvertantly deleted, there should be a way to restore it.
  366.  
  367.      Sometimes the mechanics of providing true inverses are
  368. impractical, or end up cluttering the interface themselves.  In
  369. these cases, a global "Undo" command should be provided to
  370. reverse the effect of the last operation, no matter what it was.
  371.  
  372.      OF MODES AND BANDWIDTH.  Now I am going to depart from
  373. the Card, Newell and Moran thread of discussion to consider
  374. how we can minimize the number of operations in a task by
  375. altering the modes of the interface.  Although "no modes" has
  376. been a watchword of Macintosh developers, the term may need
  377. definition for Atarians.
  378.  
  379.      Simply stated, a mode exists any time you cannot get to
  380. all of the capabilities of the program without taking some
  381. intermediate step.  Familiar examples are old-style "menu-driven"
  382. programs, in which user must make selections from a number of
  383. nested menus in order to perform any operation.  The options
  384. of any one menu are unavailable from the others.
  385.  
  386.      Recall that the user is trying to accomplish work in his
  387. own problem space, by altering its states.  A mode in the
  388. program adds additional states to the problem space, which he is
  389. forced to consider in order to get the job done.  We might call
  390. an interface which is completely modeless "transparent", because it
  391. adds no states between the user and his work.  One of the best
  392. examples of a transparent program is the 15-puzzle in the Macintosh
  393. desk accessory set.  The problem space of rearranging the tiles
  394. is identical between the program and a physical puzzle.
  395.  
  396.      Unfortunately, most programmers find themselves forced to
  397. put modes of some sort into their programs.  These often arise
  398. due to technological limitations, such as memory space, screen
  399. "real estate", or performance limitations of peripherals.  The
  400. question is how the modes can be made least offensive.
  401.  
  402.      I will make the general claim that the frustration which a
  403. mode produces is directly proportional to the amount of the user's
  404. bandwidth which it consumes.  In other words, we need to consider
  405. how many keystrokes, mouse clicks, eye movements, and so on, are
  406. going into manipulating the true problem states, and how many
  407. are being absorbed by the modes of the program.  If the interface
  408. is wasting a large amount of the user's effort, it will be perceived
  409. as slow and annoying.
  410.  
  411.      Here we can consider again the hierarchy of goals and methods
  412. which the user employs.  When the mode is low in the hierarchy,
  413. and close to the user's "fingertips", it is encountered the most
  414. frequently.  For instance, consider how frustrating it would be
  415. to have to hit a function key before typing in each character!
  416.  
  417.      The "menu-driven" style of programs mentioned above are
  418. almost as bad, since usually only one piece of information is
  419. collected at each menu.  Such a program becomes a labyrinth of
  420. states better suited to an adventure game!
  421.  
  422.      The least offensive modes are found at the higher, goal
  423. related levels of the hierarchy.  The better they align with
  424. changes in the state of the original problem, the more they
  425. are tolerated.  For example, a word processing program might
  426. have one screen layout for program editing, another for writing
  427. letters, and yet another while printing the documents.  A
  428. multi-function business package might have one set of menus for
  429. the spreadsheet, another for a graphing module, and a third
  430. for a database.
  431.  
  432.      In some cases the problem solved by the program has convenient
  433. "fracture lines" which can be used to define the modes.  An
  434. example in my own past is the RCS, where the editing of each
  435. type of resource tree forms its own mode, with each of the modes
  436. nested within the overall mode and problem of composing the
  437. entire resource tree.
  438.  
  439.      TO DO IS TO BE!  Any narrative description of user interface
  440. is bound to be lacking.  There is no way text can convey the vibrancy
  441. and tactile pleasure of a good interface, or the sullen boredom
  442. of a bad one.  Therefore, I encourage you to experiment.  Get out
  443. your favorite arcade game and see if you can spot some of the
  444. elements I have described.  Dig into your slush pile for the most
  445. annoying program you have ever seen, run it and see if you can see
  446. mistakes.  How would you fix them?  Then... go do it to your own
  447. program!
  448.  
  449.      AMEN...  This concludes the sermon.  I'd like some Feedback
  450. as to whether you found this Boring Beyond Belief or Really Hot
  451. Stuff.  If enough people are interested, homily number two will
  452. appear a few episodes from now.   The very next installment of ST
  453. PRO GEM will go back to basics to explore VDI drawing primitives.
  454. In the meantime, you might investigate some of the Good Books on
  455. interface design referenced below.
  456.  
  457.      REFERENCES.  Stuart K. Card, Thomas P. Moran, and Allen
  458. Newell, THE PSYCHOLOGY OF HUMAN-COMPUTER INTERACTION, Lawrence
  459. Erlbaum Associates, Hillsdale, New Jersey, 1983.  (Fundamental
  460. and indispensible.  The volume of experimental results make it
  461. weighty.  The Good Parts are at the beginning and end.)
  462.  
  463.      "Macintosh User Interface Guidelines", in INSIDE MACINTOSH,
  464. Apple Computer, Inc., 1984.  (Yes, Atarians, we have something to
  465. learn here.  Though not everything "translates", this is a fine
  466. piece of principled design work.  Read and appreciate.)
  467.  
  468.      James D. Foley, Victor L. Wallace, and Peggy Chan, "The
  469. Human Factors of Computer Graphics Interaction Techniques",
  470. IEEE Computer Graphics (CG & A), November 1984, pp. 13-48.
  471. (A good overview, including higher level topics which I have
  472. postponed to a later article.  Excellent bibliography.)
  473.  
  474.      J. D. Foley and A. Van Dam, FUNDAMENTALS OF INTERACTIVE
  475. COMPUTER GRAPHICS, Addison Wesley, 1984, Chapters 5 and 6.  (If
  476. you can't get the article above, read this.  If you are designing
  477. graphics apps, buy the whole book!  Staggering bibliography.)
  478.  
  479.      Ben Schneidermann, "Direct Manipulation: A Step Beyond
  480. Programming Languages", IEEE Computer, August 1983, pp. 57-69.
  481. (What do Pacman and Visicalc have in common?  Schneidermann's
  482. analysis is vital to creating hot interfaces.)
  483. ə